//
//  NSString+KSize.m
//  Keping
//
//  Created by apple on 2017/11/25.
//  Copyright © 2017年 柯平. All rights reserved.
//

#import "NSString+KSize.h"

@implementation NSString (KSize)

+ (CGSize)sizeWithString:(NSString *)text Size:(CGSize)size Font:(CGFloat)font
{
    CGSize frame = [text boundingRectWithSize:size
                                      options:NSStringDrawingUsesFontLeading | NSStringDrawingUsesLineFragmentOrigin
                                   attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:font]}
                                      context:nil].size;
    return frame;
}

@end
